@extends('layouts.template')

@section('title', '管理后台')

@section('content')

    <script>
        $(function(){

            var form = new Vue({
                el:'#contentpanel',
                data:{
                },
                computed:{
                },
                mounted:function(){
                },
                watch: {
                },
                methods:{
                },
                components:{
                }
            });

        });

    </script>

    <div class="contentpanel" id="contentpanel">

        <div class="form-group">
            <label>
                <a class="btn btn-primary" href="{{url('article/banneradd')}}">+ 添加Banner</a>
            </label>
        </div>

        <div class="row">
            <div class="col-md-12">
                <div class="table-responsive">
                    <table class="table mb30">
                        <thead>
                        <tr style="white-space:nowrap">
                            <th>名称</th>
                            <th>排序数字</th>
                            <th>图片</th>
                            <th>链接</th>
                            <th>创建时间</th>
                            <th>操作</th>
                        </tr>
                        </thead>
                        <tbody>
                        <?php foreach ($list as $row):?>
                            <tr data-id="{{$row->id}}">
                                <td>{{$row->name}}</td>
                                <td>{{$row->sort}}</td>
                                <td><img width="100" src="{{$row->banner_img_url}}"></td>
                                <td><a target="_blank" href="{{$row->url}}">{{$row->url}}</a></td>
                                <td>{{$row->add_time}}</td>
                                <td>
                                    <a href="{{url("article/banneredit/{$row->id}")}}" class="btn btn-white">编辑</a>
                                    <a onclick="return confirm('确定')" href="{{url("article/bannerdelete/{$row->id}")}}" class="btn btn-danger">删除</a>
                                </td>
                            </tr>
                        <?php endforeach;?>
                        </tbody>
                    </table>
                </div>
                <!-- table-responsive -->
            </div>
            <!-- col-md-12 -->
        </div>
    </div><!-- contentpanel -->


@endsection

